package com.rulin.asp.business.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.rulin.asp.business.entity.Dictionary;
import com.rulin.asp.business.mapper.DictionaryMapper;

@Service
public class DictionaryService {

	@Autowired
	private DictionaryMapper dictionaryMapper;
	
	public List<Dictionary> getByModel(String model){
		List<Dictionary> list = dictionaryMapper.selectByModel(model);
		return list;
	}
	
	public Dictionary getByCode(String model,String code){
		return dictionaryMapper.selectByModelAndCode(model, code);
	}
	
	public Dictionary getByValue(String model,String value){
		return dictionaryMapper.selectByModelAndValue(model, value);
	}
}
